<!-- Top Navbar-->
<div class="navbar">
    <div class="navbar-inner">
        <div class="center">购物车</div>
    </div>
</div>
<!-- /End of Top Navbar-->

<!-- Now we need additional "navbar-through" and "toolbar-through" classes on Pages -->
<div class="pages navbar-through toolbar-through">
    <div data-page="cart" class="page">
        <div class="page-content">
            <div class="card">
                <div class="card-content">
                    <div class="card-content-inner">还未选择任何商品!</div>
                </div>
            </div>
            <div class="list-block media-list">
                <ul>
                    @foreach($cart as $v)
                        <li class="swipeout" id="goods-{{ $v->id }}">
                            <div class="swipeout-content item-content">
                                <a href="#" class="item-link item-content">
                                    <div class="item-media"><img src="{{ action('ImgController@getPicture', ['sourceName' => $v->thumb, 'size' => '80x80']) }}"></div>
                                    <div class="item-inner">
                                        <div class="item-title-row closeLink">
                                            <div class="item-title">{{ $v->title }}</div>
                                            <div class="item-after">{{ $v->realAmount }} 円</div>
                                        </div>
                                        <div class="item-text">{{ $v->abstract }}</div>
                                    </div>
                                </a>
                            </div>
                            {{--<div class="shop-add">--}}
                                {{--<i class="fa fa-cart-arrow-down"></i>--}}
                                {{--<span data-id="{{ $v->id }}" data-amount="{{ $v->realAmount }}">{{ $v->shopNum }}</span>--}}
                                {{--<i class="fa fa-cart-plus"></i>--}}
                            {{--</div>--}}
                            <div class="form-group shop-add">
                                <div class="col-xs-6"></div>
                                <div class="col-xs-6">
                                    <p class="buttons-row">
                                        <a href="#" class="button down hidden"><i class="fa fa-cart-arrow-down fa-2x"></i></a>
                                        <span class="button" data-id="{{ $v->id }}" data-amount="{{ $v->realAmount }}">{{ $v->shopNum }}</span>
                                        <a href="#" class="button plus"><i class="fa fa-cart-plus fa-2x"></i></a>
                                    </p>
                                </div>
                            </div>
                            <div class="swipeout-actions-right">
                                <!-- Add this button and item will be deleted automatically -->
                                <a href="#" class="swipeout-delete">删除</a>
                            </div>
                        </li>
                    @endforeach
                </ul>
            </div>
            <div class="popup popup-pay">
                <div class="content-block">
                    <p><a href="#" class="close-popup">返回</a></p>
                    <div class="content-block-title">送货地址 <a href="{{ action('Wx\UserController@getAddressAdd') }}" class="link">添加</a></div>
                    <div class="list-block">
                        <ul>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-input">
                                            <textarea type="text" name="address" placeholder="您的地址" readonly id="picker-address"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="list-block">
                        <ul>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-input">
                                            <input type="text" name="shopTime" placeholder="送货时间" readonly id="shop-time">
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th class="text-center">单价(円)</th>
                                <th class="text-center">数量</th>
                                <th class="text-center">合计(円)</th>
                            </tr>
                            </thead>
                            <tbody id="payList">
                            @foreach($cart as $v)
                                <tr id="pay-{{ $v->id }}">
                                    <td>{{ $v->title }}</td>
                                    <td class="text-center">{{ $v->realAmount }}</td>
                                    <td class="text-center">{{ $v->shopNum }}</td>
                                    <td class="text-center">{{ $v->realAmount * $v->shopNum }}</td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                    <ul class="list-inline pull-right" style="padding-top: 10px">
                        <li>总计：<span id="pay-sumAmount"></span> 円</li>
                        <li><button class="button button-fill button-red open-popup" onclick="WXPayment()">支付</button></li>
                    </ul>

                </div>
            </div>
        </div>
    </div>
</div>
